package com.gnerv.battle.boot.framework.core.tools;

/**
 * 常用地址工具
 *
 * @author Gnerv LiGen
 */
public class PathTools {

    private static final String USER_DIR = "user.dir";
    private static final String CONFIG = "/config";
    private static final String LOGS = "/logs";
    private static final String SCRIPT = "/bin";

    private PathTools() {
    }

    /**
     * 项目运行根目录
     */
    public static String projectDirectory() {
        return System.getProperty(USER_DIR);
    }

    /**
     * 项目运行配置文件目录
     */
    public static String projectConfigDirectory() {
        return System.getProperty(USER_DIR) + CONFIG;
    }

    /**
     * 项目运行日志文件目录
     */
    public static String projectLogDirectory() {
        return System.getProperty(USER_DIR) + LOGS;
    }

    /**
     * 项目运行脚本文件目录
     */
    public static String projectScriptDirectory() {
        return System.getProperty(USER_DIR) + SCRIPT;
    }

}
